.workflow-container {
  height: 100%;
  width: 100%;

  .workflow {
    display: flex;
    height: 100%;
    width: 100%;
    flex-direction: column;
  }

  .workflow-warp {
    height: 100%;
    width: 100%;
  }

  .workflow-content {
    .workflow-content-absolute {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      top: 0
    }
  }

  .workflow-left {
    //position: absolute;
    //left: 0;
    //top: 0;
    width: 240px;
    height: 100%;
    border-right: 1px solid var(--el-border-color-light, #ebeef5);

    :deep(.el-collapse-item__content) {
      padding-bottom: 0;
    }

    .workflow-left-title {
      height: 50px;
      display: flex;
      align-items: center;
      padding: 0 10px;
      border-top: 1px solid var(--el-border-color-light, #ebeef5);
      color: var(--el-text-color-primary);
      cursor: default;

      span {
        flex: 1;
      }
    }

    .workflow-left-item {
      display: inline-block;
      width: calc(50% - 10px);
      position: relative;
      cursor: move;
      margin: 0 0 6px 6px;

      .workflow-left-item-icon {
        height: 30px;
        display: flex;
        align-items: center;
        transition: all 0.3s ease;
        padding: 3px 5px;
        border: 1px dashed var(--el-border-color);
        background: var(--next-bg-color);
        border-radius: 3px;

        i,
        .name {
          transition: all 0.3s ease;
          white-space: nowrap;
          text-overflow: ellipsis;
          overflow: hidden;
        }

        &:hover {
          transition: all 0.3s ease;
          border: 1px dashed var(--el-color-primary);
          background: var(--el-color-primary-light-9);
          border-radius: 5px;
        }
      }

      &.workflow-danger {
        .workflow-left-item-icon {
          color: var(--el-color-error);
          border: 1px solid var(--el-color-error);
          background: var(--el-color-error-light-9);

          &:hover {
            border: 1px dashed var(--el-color-error);
            background: var(--el-color-error-light-9);
          }
        }
      }

      &.workflow-success {
        .workflow-left-item-icon {
          color: var(--el-color-success);
          border: 1px solid var(--el-color-success);
          background: var(--el-color-success-light-9);

          &:hover {
            border: 1px dashed var(--el-color-success);
            background: var(--el-color-success-light-9);
          }
        }
      }

      &.workflow-primary {
        .workflow-left-item-icon {
          color: var(--el-color-primary);
          border: 1px solid var(--el-color-primary);
          background: var(--el-color-primary-light-9);

          &:hover {
            border: 1px dashed var(--el-color-primary);
            background: var(--el-color-primary-light-9);
          }
        }
      }

      &.workflow-warning {
        .workflow-left-item-icon {
          color: var(--el-color-warning);
          border: 1px solid var(--el-color-warning);
          background: var(--el-color-warning-light-9);

          &:hover {
            border: 1px dashed var(--el-color-warning);
            background: var(--el-color-warning-light-9);
          }
        }
      }

      &.workflow-info {
        .workflow-left-item-icon {
          color: var(--el-color-info);
          border: 1px solid var(--el-color-info);
          background: var(--el-color-info-light-9);

          &:hover {
            border: 1px dashed var(--el-color-info);
            background: var(--el-color-info-light-9);
          }
        }
      }

      &.workflow-other-1 {
        .workflow-left-item-icon {
          color: #f300fb;
          border: 1px solid #f300fb;
          background: #feecff;

          &:hover {
            border: 1px dashed #f300fb;
            background: #feecff;
          }
        }
      }

      &.workflow-other-2 {
        .workflow-left-item-icon {
          color: #0b35dc;
          border: 1px solid #0b35dc;
          background: #eaf1f2;

          &:hover {
            border: 1px dashed #0b35dc;
            background: #eaf1f2;
          }
        }
      }

      &.workflow-other-3 {
        .workflow-left-item-icon {
          color: #5d7aa5;
          border: 1px solid #5d7aa5;
          background: #e0e8f4;

          &:hover {
            border: 1px dashed #5d7aa5;
            background: #e0e8f4;
          }
        }
      }
    }

    & .workflow-left-id:first-of-type {
      .workflow-left-title {
        border-top: none;
      }
    }
  }

  .workflow-right {
    //position: absolute;
    //left: 240px;
    //top: 0;
    //right: 0;
    user-select: none;
    //width: calc(100% - 240px) !important;

    .scrollbar-coordinate {
      position: absolute;
      bottom: 0;
      right: 0;
      user-select: none;
      font-size: 20px;
    }

    .workflow-container {
      flex: 1;
      width: 5000px;
      height: 5000px;
      position: relative;
      background-image: linear-gradient(90deg, rgb(156 214 255 / 15%) 10%, rgba(0, 0, 0, 0) 10%),
      linear-gradient(rgb(156 214 255 / 15%) 10%, rgba(0, 0, 0, 0) 10%);
      background-size: 10px 10px;
    }

    .workflow-right-clone {
      position: absolute;

      .workflow-right-box {
        height: 30px;
        align-items: center;
        color: var(--el-menu-text-color);
        padding: 0 10px 0 0;
        border-radius: 3px;
        cursor: move;
        transition: all 0.3s ease;
        min-width: 94.5px;
        background: var(--el-color-white);
        border: 1px solid var(--el-menu-text-color, #ebeef5);

        .workflow-left-item-icon {
          display: flex;
          align-items: center;
          height: 100%;
        }

        .workflow-icon-drag {
          width: 30px;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        &:hover {
          transition: all 0.3s ease;
          border: 1px dashed var(--el-color-primary);
          background: var(--el-color-primary-light-9);
          color: var(--el-color-primary);

          .workflow-icon-drag {
            cursor: Crosshair;
          }
        }
      }

      .workflow-right-active {
        border: 1px dashed var(--el-color-primary);
        background: var(--el-color-primary-light-9);
        color: var(--el-color-primary);
      }
    }

    .workflow-right-clone.disabled {
      opacity: 0.8;

      .workflow-right-box {
        color: var(--el-text-color) !important;
        border: 1px solid var(--el-border-color) !important;

        &:hover {
          border: 1px dashed var(--el-border-color);
          background: var(--el-border-color);
        }

        &.workflow-right-active {
          border: 1px dashed var(--el-border-color);
          background: var(--el-border-color);
        }
      }
    }

    .workflow-right-clone.workflow-danger {
      .workflow-right-box {
        color: var(--el-color-error);
        border: 1px solid var(--el-color-error);

        &:hover {
          border: 1px dashed var(--el-color-error);
          background: var(--el-color-error-light-9);
          color: var(--el-color-error);
        }

        &.workflow-right-active {
          border: 1px dashed var(--el-color-error);
          background: var(--el-color-error-light-9);
          color: var(--el-color-error);
        }
      }
    }

    .workflow-right-clone.workflow-success {
      .workflow-right-box {
        color: var(--el-color-success);
        border: 1px solid var(--el-color-success);

        &:hover {
          border: 1px dashed var(--el-color-success);
          background: var(--el-color-success-light-9);
          color: var(--el-color-success);
        }

        &.workflow-right-active {
          border: 1px dashed var(--el-color-success);
          background: var(--el-color-success-light-9);
          color: var(--el-color-success);
        }
      }
    }

    .workflow-right-clone.workflow-primary {
      .workflow-right-box {
        color: var(--el-color-primary);
        border: 1px solid var(--el-color-primary);

        &:hover {
          border: 1px dashed var(--el-color-primary);
          background: var(--el-color-primary-light-9);
          color: var(--el-color-primary);
        }

        &.workflow-right-active {
          border: 1px dashed var(--el-color-primary);
          background: var(--el-color-primary-light-9);
          color: var(--el-color-primary);
        }
      }
    }

    .workflow-right-clone.workflow-warning {
      .workflow-right-box {
        color: var(--el-color-warning);
        border: 1px solid var(--el-color-warning);

        &:hover {
          border: 1px dashed var(--el-color-warning);
          background: var(--el-color-warning-light-9);
          color: var(--el-color-warning);
        }

        &.workflow-right-active {
          border: 1px dashed var(--el-color-warning);
          background: var(--el-color-warning-light-9);
          color: var(--el-color-warning);
        }
      }
    }

    .workflow-right-clone.workflow-info {
      .workflow-right-box {
        color: var(--el-color-info);
        border: 1px solid var(--el-color-info);

        &:hover {
          border: 1px dashed var(--el-color-info);
          background: var(--el-color-info-light-9);
          color: var(--el-color-info);
        }

        &.workflow-right-active {
          border: 1px dashed var(--el-color-info);
          background: var(--el-color-info-light-9);
          color: var(--el-color-info);
        }
      }
    }

    .workflow-right-clone.workflow-other-1 {
      .workflow-right-box {
        color: #f300fb;
        border: 1px solid #f300fb;

        &:hover {
          border: 1px dashed #f300fb;
          background: #feecff;
          color: #f300fb;
        }

        &.workflow-right-active {
          border: 1px dashed #f300fb;
          background: #feecff;
          color: #f300fb;
        }
      }
    }

    .workflow-right-clone.workflow-other-2 {
      .workflow-right-box {
        color: #0b35dc;
        border: 1px solid #0b35dc;

        &:hover {
          border: 1px dashed #0b35dc;
          background: #eaf1f2;
          color: #0b35dc;
        }

        &.workflow-right-active {
          border: 1px dashed #0b35dc;
          background: #eaf1f2;
          color: #0b35dc;
        }
      }
    }

    .workflow-right-clone.workflow-other-3 {
      .workflow-right-box {
        color: #5d7aa5;
        border: 1px solid #5d7aa5;

        &:hover {
          border: 1px dashed #5d7aa5;
          background: #e0e8f4;
          color: #5d7aa5;
        }

        &.workflow-right-active {
          border: 1px dashed #5d7aa5;
          background: #e0e8f4;
          color: #5d7aa5;
        }
      }
    }

    :deep(.jtk-overlay):not(.aLabel) {
      padding: 4px 10px;
      border: 1px solid var(--el-menu-text-color, #ebeef5) !important;
      color: var(--el-menu-text-color) !important;
      background: var(--el-color-white) !important;
      border-radius: 3px;
      font-size: 10px;
    }

    //:deep(.jtk-overlay.workflow-right-empty-label) {
    //  display: none;
    //}
  }

  .workflow-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    &::after {
      content: '手机版不支持 jsPlumb 操作';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      z-index: 1;
      background: rgba(255, 255, 255, 0.9);
      color: #666666;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}
